package edu.xust.entity;

import java.io.Serializable;

/**
 * @author 
 */
public class Course implements Serializable {
    private Integer kno;

    private String kname;

    private static final long serialVersionUID = 1L;

    public Integer getKno() {
        return kno;
    }

    public void setKno(Integer kno) {
        this.kno = kno;
    }

    public String getKname() {
        return kname;
    }

    public void setKname(String kname) {
        this.kname = kname;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Course other = (Course) that;
        return (this.getKno() == null ? other.getKno() == null : this.getKno().equals(other.getKno()))
            && (this.getKname() == null ? other.getKname() == null : this.getKname().equals(other.getKname()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getKno() == null) ? 0 : getKno().hashCode());
        result = prime * result + ((getKname() == null) ? 0 : getKname().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", kno=").append(kno);
        sb.append(", kname=").append(kname);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}